'use strict';
const db = uniCloud.database();
exports.main = async (event, context) => {
	try {
		// 获取商品分类
		let result = await db.collection(event.name)
			.where({
				category_id: event.id
			})
			.limit(event.number.goodsLimit)
			.skip(event.number.goodsSkip)
			.get()
		return result
	} catch (e) {
		console.log(e)
	}
};
